package com.dura.test;

import com.dura.common.constant.CacheConstant;
import com.dura.test.client.CacheClient;
import com.dura.test.mapper.MobileDirtyWordMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

/**
 * @version 1.0
 * @Author 振鹏
 * @Date 2025/3/15 18:04
 * @注释
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class MobileMobileWordMapperTest {

    @Autowired
    private MobileDirtyWordMapper mapper;

    @Autowired
    private CacheClient cacheClient;

    @Test
    public void findAll() {
        List<String> list = mapper.findDirtyWord();
        cacheClient.saddStr(CacheConstant.DIRTY_WORD, list.toArray(new String[]{}));
    }

}
